﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using Kingdee.BOS;
using Kingdee.BOS.Contracts;
using Kingdee.BOS.Orm.DataEntity;

namespace CHR.Contract.Common
{
    public interface INameRepeat
    {
        /// <summary>
        /// 名称重复检验
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="names">多语言名称</param>
        /// <param name="tableName">表名</param>
        /// <param name="pkField">主键字段名</param>
        /// <param name="pkValue">主键字段值</param>
        /// <param name="whereParams">参数序列</param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(ServiceFault))]
        bool NameRepeat(Context ctx, LocaleValue names, string tableName, string pkField,Int64 pkValue,
                        Dictionary<string, object> whereParams);
        /// <summary>
        /// 获取重名的语言码
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="names">多语言名称</param>
        /// <param name="tableName">表名</param>
        /// <param name="pkField">主键字段名</param>
        /// <param name="pkValue">主键字段值</param>
        /// <param name="whereParams">参数序列</param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(ServiceFault))]
        DynamicObjectCollection GetNameRepeatLocale(Context ctx, LocaleValue names, string tableName, string pkField, Int64 pkValue,
                        Dictionary<string, object> whereParams);
    }
}
